package cn.cjlmonster.demo02.ui;

import android.view.MotionEvent;
import android.view.View;
import android.widget.Button;

import androidx.core.widget.NestedScrollView;

import java.util.Objects;

import cn.cjlmonster.demo02.R;
import cn.cjlmonster.demo02.base.BaseAppCompatActivity;
import cn.cjlmonster.demo02.widget.MyScrollView;

/**
 * cn.cjlmonster.demo02.ui
 *
 * @author cjl
 * @project Demo02
 * @date 2022/4/12 10:48 下午
 */
public class TestActivity extends BaseAppCompatActivity {

    @Override
    protected int getLayoutId() {
        return R.layout.activity_test;
    }

    @Override
    protected boolean canBack() {
        return false;
    }

    private Button btn_test;
    private MyScrollView nest;
    private View margin;

    @Override
    protected void initView() {
        Objects.requireNonNull(getSupportActionBar()).hide();
        btn_test = findViewById(R.id.btn_test);
        nest = findViewById(R.id.nest);
        margin = findViewById(R.id.margin);
        nest.setDependency(margin);
    }

    @Override
    protected void initEvents() {
        btn_test.setOnClickListener(v -> showToast("测试"));
    }
}
